Zero-Overhead Exeption Handling Using Metaprogramming

نویسندگان

  • Markus Hof
  • Hanspeter Mössenböck
  • Peter Pirkelbauer
چکیده

We present a novel approach to exception handling which is based on metaprogramming. Our mechanism does not require language support, imposes no run time overhead to errorfree programs, and is easy to implement. Exception handlers are implemented as ordinary procedures. When an exception occurs, the corresponding handler is searched dynamically using the type of the exception as a search criterion. Our implementation was done in the Oberon System but it could be ported to most other systems that support metaprogramming.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Metaparse Compile-time parsing with template metaprogramming

Metaparse is a C++ template metaprogramming library for generating parsers, which are template metaprograms themselves parsing strings at C++ compile-time. Parsers built with Metaparse take free-formed strings as input and parse them at compile-time, thus it is possible to build a parser and apply it in the same session of compilation. The C++11 standard provides constexpr, a construct for exec...

متن کامل

A Program Specialiser

Meta-level compositions of object logic programs are naturally implemented by means of meta-programming techniques. Meta-interpreters deening program compositions however suuer from a computational overhead that is due partly to the interpretation layer present in all meta-programs, and partly to the speciic interpretation layer needed to deal with program compositions. We show that meta-interp...

متن کامل

Run-time Manipulation of Programs in a Statically-Typed Language

This article is an extended abstract of a doctoral dissertation on metaprogramming and programming language design. A metaprogramming model is studied and implemented in a statically–typed pure object– oriented programming language Zero. The object model of language is based on closures which enables metaprogramming model to achieve a high degree of dynamic manipulation, normally only found in ...

متن کامل

Design and Implementation of a Cross-Layer IoT Protocol

Cross-layer communication protocols can signi cantly improve several aspects of wireless networks, particularly energy consumption and bandwidth. However, they break with the traditional layered architecture that has been so successful for over 30 years. A fully edged cross-layer stack requires a sophisticated software design to be maintainable and reusable. The Trustful Space-Time Protocol (TS...

متن کامل

Compiler-Enforced Memory Semantics in the SACLIB Computer Algebra Library

Compiler-Enforced Memory Semantics in the SACLIB Computer Algebra Library David G. Richardson Advisor: Werner Krandick We present a memory management subsystem for the computer algebra library SACLIB that removes the potential for memory leaks or double deletes in applications using the system. The system encapsulates the management of arrays that are allocated on the heap or on the system stac...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997